{% extends "admin/base.html" %}
{% load i18n mobile_admin mobile_admin_modify %}

{% block breadcrumbs %}
<a href="javascript:" id="_applist" class="float-left active">{% filter truncate_dot:14 %}{% trans "Site administration" %}{% endfilter %}</a>
<a href="javascript:" id="_recent" class="float-right inactive">{% filter truncate_dot:14 %}{% trans 'Recent Actions' %}{% endfilter %}</a>
{% endblock %}

{% block content %}
{% load adminapplist %}
{% get_admin_app_list as app_list %}
{% if app_list %}
    <ul id="applist" selected="true">
    {% for app in app_list %}
    <li class="group">{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</li>
    {% for model in app.models %}
        {% if model.perms.change %}
            <li><a target="_self" href="{{ model.admin_url }}">{{ model.name }}</a></li>
        {% else %}
            <li>{{ model.name }}</li>
        {% endif %}
    {% endfor %}
    {% endfor %}
    </ul>
{% else %}
    <div class="panel" selected="true">
        <h1 class="error">{% trans "You don't have permission to edit anything." %}</p>
    </div>
{% endif %}

<ul id="recent">
    <li class="group subgroup">{% trans 'My Actions' %}</li>
    {% load log %}
    {% get_admin_log 10 as admin_log for_user user %}
    {% if not admin_log %}
    <li>{% trans 'None available' %}</li>
    {% else %}
    {% for entry in admin_log %}
    <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}: {{ entry.object_repr|escape|truncate_dot:35 }}{% if not entry.is_deletion %}</a>{% endif %}</li>
    {% endfor %}
    {% endif %}
</ul>
{% include_admin_script "js/index.js" %}
{% endblock %}
